﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ToolInputComponent : MonoBehaviour {


    [SerializeField]
    UIInput m_UIInput;

    void Start () {

    }
	

    public void OK()
    {
        if (UIComponentMastermind.instance.Func_InputOK != null)
        {
            UIComponentMastermind.instance.Func_InputOK(m_UIInput.value);
            UIComponentMastermind.instance.Func_InputOK = null;
        }
        this.gameObject.SetActive(false);
        m_UIInput.value = "";
    }
    public void Cancel()
    {
        if (UIComponentMastermind.instance.Func_InputCancel != null)
        {
            UIComponentMastermind.instance.Func_InputCancel();
            UIComponentMastermind.instance.Func_InputCancel = null;
        }
        this.gameObject.SetActive(false);
        m_UIInput.value = "";
    }

}
